#coding:utf-8
import xlrd

book=xlrd.open_workbook('xxx\SOWC 2014 Stat Tables_Table 9.xlsx')#若.py和.xlsx不在同一目录下，xxx即为绝对路径
sheet=book.sheet_by_name('Table 9 ')
print sheet.nrows,sheet.ncols #行数、列数
print sheet.row_values(14)[1]
print sheet.col_values(2)[14:24]
print sheet.cell(14,1).value

print '**********************'
data={}
count=0
for i in range(sheet.nrows):
	if count<10:
		if i>14:
			row=sheet.row_values(i)
			country=row[1]
			data[country]={}
			count+=1

print data
print '**************'
data_1={}
for i in xrange(14,sheet.nrows):
	row=sheet.row_values(i)
	country=row[1]
	data_1[country]={
	'child_labor':{
	    'total':[row[4],row[5]],
	    'male':[row[6],row[7]],
	    'female':[row[8],row[9]],
	},
	'child_marriage':{
	'married_by_15':[row[10],row[11]],
	'married_by_18':[row[12],row[13]],
	}
	}
print data_1[sheet.cell(14,1).value]